﻿@model hethongbansach.Models.dangnhap
@{
    ViewBag.Title = "Đăng nhập";
}

<div class="covercenter">
<div class="columncenter">
<div class="header-center">ĐĂNG NHẬP</div>
<div class="text" style="margin: 20px 10px 10px 20px">
@if (!Request.IsAuthenticated || (Request.IsAuthenticated && Session["User"] == null))
{
        FormsAuthentication.SignOut();
       using (Html.BeginForm())
       {
        @Html.ValidationSummary(true)
        <table>
            <tr>
                <td>@Html.LabelFor(model => model.username)</td>
                <td>@Html.TextBoxFor(model => model.username, new { size = 30 })
                    @Html.ValidationMessageFor(model => model.username)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(model => model.password)</td>
                <td>@Html.PasswordFor(model => model.password, new { size = 30 })
                    @Html.ValidationMessageFor(model => model.password)</td>
            </tr>
            <tr>
                <td>@Html.LabelFor(model => model.remember)</td>
                <td>@Html.CheckBoxFor(model => model.remember)</td>
            </tr>
            <tr>
                <td></td>
                <td><input type="submit" value="Đăng nhập" /></td>
            </tr>
        </table>
       }
}
else
{
     @Html.ActionLink("Trang chủ", "TrangChu", "Home") 
}
</div>
</div>
</div>